<template>
  <br />
  <z-affix :offset-top="top">
    <z-button type="primary" @click="top += 10">Affix top</z-button>
  </z-affix>
  <br />
  <z-affix :offset-bottom="bottom">
    <z-button type="primary" @click="bottom += 10">Affix bottom</z-button>
  </z-affix>
</template>
<script>
import { defineComponent, ref } from 'vue'
export default defineComponent({
  setup() {
    const top = ref(10)
    const bottom = ref(10)
    return {
      top,
      bottom
    }
  }
})
</script>
